package cn.ydt.ydt.sso.webapi.controller;


import cn.ydt.ydt.common.resful.JsonResult;
import cn.ydt.ydt.pojo.admin.dto.NetLoginDTO;
import cn.ydt.ydt.sso.service.INetService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping(value = "/net" , produces = "application/json;charset=utf8")
@Api(tags = "网格员登录功能")
public class NetController {

    @Autowired
    INetService netService;

    @PostMapping("/login")
    @ApiOperation("网格员登录接口")
    public JsonResult<String> netLogin(@RequestBody NetLoginDTO netLoginDTO){
       String jwt = netService.netLogin(netLoginDTO);
       return JsonResult.ok(jwt,"登录成功！");
    }
}
